#!/bin/bash

echo "=== Nginx 连接监控 ==="
echo "当前时间: $(date)"

echo -e "\n活动连接:"
netstat -an | grep :87 | grep ESTABLISHED

echo -e "\nNginx 进程状态:"
ps aux | grep nginx

echo -e "\n最近的错误日志:"
tail -n 10 /var/log/nginx/stack.error.log

echo -e "\n最近的访问日志:"
tail -n 10 /var/log/nginx/stack.access.log 